// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
@import "../core/index.module.scss";

.box-highlight {
  font-family: $font-family--monospace;
  padding: 20px;
  width: 100%;
  margin-bottom: 29px;
  height: 282px;
  white-space: pre-wrap;
  background-color: $colors--neutral-10;
  box-shadow: 0px 0px 1px rgba(67, 90, 111, 0.415);
  border-radius: 3px;
  overflow-y: auto;

  .sql-highlight {
    color: $colors--neutral-2;
    overflow-x: auto;
    font-family: SFMono-Semibold;
    font-size: 14px;
    line-height: 1.57;
    white-space: pre;
    word-wrap: break-word;

    span {
      font-family: SFMono-Semibold;
      color: $colors--neutral-2;
    }

    :global(.hljs-label) {
      padding-left: 8px;
    }
    :global(.hljs-string) {
      color: $colors--functional-orange-3;
    }
    :global(.hljs-built_in) {
      color: $colors--functional-orange-3;
    }
    :global(.hljs-keyword) {
      color: $colors--functional-purple-1;
    }
  }
}

.small {
  height: 200px;
}

.large {
  height: 400px;
}

.custom {
  min-height: 100px;
  max-height: 400px;
  height: auto;
}

.highlight-divider {
  width: 100%;
  height: 1px;
  border-bottom: 1px dashed $colors--neutral-6;
  margin: 15px 0;
}

:global(.ant-tooltip) {
  &:global(.hljs) {
    &:global(.ant-tooltip-content) {
      width: 535px;
    }
    &:global(.ant-tooltip-inner) {
      background-color: $colors--neutral-8;
      padding: 8px;
    }
    .sql-highlight {
      &:global(.hljs) {
        background-color: $colors--neutral-8;
        padding: 0;
        margin: 0;
      }
    }
  }
}
